<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Team</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Team</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/lib/team_rb.html">
                lib/team.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
This class
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000171">all_away_games</a>&nbsp;&nbsp;
      <a href="#M000169">all_games</a>&nbsp;&nbsp;
      <a href="#M000170">all_home_games</a>&nbsp;&nbsp;
      <a href="#M000172">games_for_date</a>&nbsp;&nbsp;
      <a href="#M000175">get_cleanup_hitters_by_year</a>&nbsp;&nbsp;
      <a href="#M000176">get_cleanup_hitters_unique</a>&nbsp;&nbsp;
      <a href="#M000179">get_close_pitcher_appearances_by_year</a>&nbsp;&nbsp;
      <a href="#M000180">get_closers_unique</a>&nbsp;&nbsp;
      <a href="#M000183">get_games_for_month</a>&nbsp;&nbsp;
      <a href="#M000173">get_leadoff_hitters_by_year</a>&nbsp;&nbsp;
      <a href="#M000174">get_leadoff_hitters_unique</a>&nbsp;&nbsp;
      <a href="#M000184">get_opening_day_game</a>&nbsp;&nbsp;
      <a href="#M000177">get_start_pitcher_appearances_by_year</a>&nbsp;&nbsp;
      <a href="#M000178">get_starters_unique</a>&nbsp;&nbsp;
      <a href="#M000168">get_teams_for_gid</a>&nbsp;&nbsp;
      <a href="#M000166">new</a>&nbsp;&nbsp;
      <a href="#M000185">opening_day_roster</a>&nbsp;&nbsp;
      <a href="#M000182">players_for_season</a>&nbsp;&nbsp;
      <a href="#M000181">quality_starts_count</a>&nbsp;&nbsp;
      <a href="#M000167">teams</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">START_MONTH</td>
          <td>=</td>
          <td class="context-item-value">4</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">END_MONTH</td>
          <td>=</td>
          <td class="context-item-value">10</td>
        </tr>
        </table>
      </div>
    </div>



    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">abrev</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">city</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">games</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">league</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">name</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000168" class="method-detail">
        <a name="M000168"></a>

        <div class="method-heading">
          <a href="Team.src/M000168.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000168.html');return false;">
          <span class="method-name">get_teams_for_gid</span><span class="method-args">(gid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a 2 element array specifying the two <a
href="Team.html#M000167">teams</a> associated with the game id (gid) passed
in. <a href="Team.html#M000167">teams</a>[0] = visitor <a
href="Team.html#M000167">teams</a>[1] = home
</p>
        </div>
      </div>

      <div id="method-M000166" class="method-detail">
        <a name="M000166"></a>

        <div class="method-heading">
          <a href="Team.src/M000166.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000166.html');return false;">
          <span class="method-name">new</span><span class="method-args">(abrev)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Setup team names, abbreviations, and league
</p>
        </div>
      </div>

      <div id="method-M000167" class="method-detail">
        <a name="M000167"></a>

        <div class="method-heading">
          <a href="Team.src/M000167.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000167.html');return false;">
          <span class="method-name">teams</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000171" class="method-detail">
        <a name="M000171"></a>

        <div class="method-heading">
          <a href="Team.src/M000171.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000171.html');return false;">
          <span class="method-name">all_away_games</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of all away games for this team for the specified season
</p>
        </div>
      </div>

      <div id="method-M000169" class="method-detail">
        <a name="M000169"></a>

        <div class="method-heading">
          <a href="Team.src/M000169.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000169.html');return false;">
          <span class="method-name">all_games</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of all games for this team for the specified season
</p>
        </div>
      </div>

      <div id="method-M000170" class="method-detail">
        <a name="M000170"></a>

        <div class="method-heading">
          <a href="Team.src/M000170.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000170.html');return false;">
          <span class="method-name">all_home_games</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of all home games for this team for the specified season
</p>
        </div>
      </div>

      <div id="method-M000172" class="method-detail">
        <a name="M000172"></a>

        <div class="method-heading">
          <a href="Team.src/M000172.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000172.html');return false;">
          <span class="method-name">games_for_date</span><span class="method-args">(year, month, day)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of the team&#8216;s game objects for the date passed in.
</p>
        </div>
      </div>

      <div id="method-M000175" class="method-detail">
        <a name="M000175"></a>

        <div class="method-heading">
          <a href="Team.src/M000175.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000175.html');return false;">
          <span class="method-name">get_cleanup_hitters_by_year</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array containing the cleanup hitters for each game of the
specified season. The cleanup hitter is the 4th hitter in the batting order
</p>
        </div>
      </div>

      <div id="method-M000176" class="method-detail">
        <a name="M000176"></a>

        <div class="method-heading">
          <a href="Team.src/M000176.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000176.html');return false;">
          <span class="method-name">get_cleanup_hitters_unique</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of all hitters who have hit in the cleanup spot (4) at
least one game during the specified season
</p>
        </div>
      </div>

      <div id="method-M000179" class="method-detail">
        <a name="M000179"></a>

        <div class="method-heading">
          <a href="Team.src/M000179.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000179.html');return false;">
          <span class="method-name">get_close_pitcher_appearances_by_year</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000180" class="method-detail">
        <a name="M000180"></a>

        <div class="method-heading">
          <a href="Team.src/M000180.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000180.html');return false;">
          <span class="method-name">get_closers_unique</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of all pitchers who have closed at least one game during
the specified season
</p>
        </div>
      </div>

      <div id="method-M000183" class="method-detail">
        <a name="M000183"></a>

        <div class="method-heading">
          <a href="Team.src/M000183.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000183.html');return false;">
          <span class="method-name">get_games_for_month</span><span class="method-args">(year, month)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of all the games for this team for the year and month
specified
</p>
        </div>
      </div>

      <div id="method-M000173" class="method-detail">
        <a name="M000173"></a>

        <div class="method-heading">
          <a href="Team.src/M000173.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000173.html');return false;">
          <span class="method-name">get_leadoff_hitters_by_year</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of <a href="BattingAppearance.html">BattingAppearance</a>
containing the leadoff hitters for each game of the specified season.
</p>
        </div>
      </div>

      <div id="method-M000174" class="method-detail">
        <a name="M000174"></a>

        <div class="method-heading">
          <a href="Team.src/M000174.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000174.html');return false;">
          <span class="method-name">get_leadoff_hitters_unique</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of <a href="BattingAppearance.html">BattingAppearance</a>
of all hitters who have led off at least one game during the specified
season
</p>
        </div>
      </div>

      <div id="method-M000184" class="method-detail">
        <a name="M000184"></a>

        <div class="method-heading">
          <a href="Team.src/M000184.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000184.html');return false;">
          <span class="method-name">get_opening_day_game</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a game object representing the opening day game for this team for
the season passed in.
</p>
        </div>
      </div>

      <div id="method-M000177" class="method-detail">
        <a name="M000177"></a>

        <div class="method-heading">
          <a href="Team.src/M000177.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000177.html');return false;">
          <span class="method-name">get_start_pitcher_appearances_by_year</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000178" class="method-detail">
        <a name="M000178"></a>

        <div class="method-heading">
          <a href="Team.src/M000178.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000178.html');return false;">
          <span class="method-name">get_starters_unique</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of all pitchers who have started at least one game during
the specified season
</p>
        </div>
      </div>

      <div id="method-M000185" class="method-detail">
        <a name="M000185"></a>

        <div class="method-heading">
          <a href="Team.src/M000185.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000185.html');return false;">
          <span class="method-name">opening_day_roster</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a <a href="Roster.html">Roster</a> object representing the opening
day roster for this team for the specified year.
</p>
        </div>
      </div>

      <div id="method-M000182" class="method-detail">
        <a name="M000182"></a>

        <div class="method-heading">
          <a href="Team.src/M000182.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000182.html');return false;">
          <span class="method-name">players_for_season</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns an array of all players who have played at least one game for this
team during the specified season.
</p>
        </div>
      </div>

      <div id="method-M000181" class="method-detail">
        <a name="M000181"></a>

        <div class="method-heading">
          <a href="Team.src/M000181.html" target="Code" class="method-signature"
            onclick="popupCode('Team.src/M000181.html');return false;">
          <span class="method-name">quality_starts_count</span><span class="method-args">(year)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a count of the number of quality starts for this team for the
specified year.
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>